/* 删除原有全局样式，完全继承game_hall.css */
@import url('game_hall.css');

/* 覆盖/新增游戏房间特有样式 */
.return-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 8px 20px;
    background: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.return-btn:hover {
    transform: translateY(-2px);
}

#screen {
    /* 继承原有效果并增强 */
    width: 450px;
    height: 50px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

#screen.loading {
    position: relative;
    overflow: hidden;
}

#screen.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 25%,
        rgba(133, 237, 47, 0.15) 50%,
        transparent 75%
    );
    animation: loadingFlow 1.5s infinite;
}

@keyframes loadingFlow {
    100% { left: 100%; }
}

#screen.strong {
    animation: textImpact 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes textImpact {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* 棋盘容器增强 */
#chess {
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    background: white;
    transition: transform 0.3s ease;
}

#chess:hover {
    transform: translateY(-3px);
}



.canvas-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    /* 添加边缘光效增强对比 */
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
}

.chess-background {
    /* 减弱模糊避免线条虚化 */
    filter: blur(2px) contrast(1.1);
    opacity: 0.65; /* 降低透明度 */
}

#chess {
    /* 添加半透明遮罩层增强对比 */
    background: linear-gradient(
            45deg,
            rgba(245, 247, 250, 0.3),
            rgba(245, 247, 250, 0.15)
    ) !important;
    /* 强化边缘反光 */
    box-shadow:
            inset 0 0 25px rgba(255, 255, 255, 0.2),
            inset 0 0 15px rgba(0, 0, 0, 0.1),
            0 0 30px rgba(0, 0, 0, 0.15);
}

#chess canvas {
    /* 改用overlay混合模式 */
    mix-blend-mode: overlay;
    /* 强制开启GPU加速 */
    transform: translateZ(0);
}

#screen {
    width: 450px;
    height: 50px;
    margin-top: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    justify-content: center;
    align-items: center;
}

#screen {
    font-size: 1.2em;
    font-weight: 500;
    margin-top: 15px;
    text-align: center;
    min-height: 1.5em;
}
.highlight {
    color: #090101;
    font-weight: bold;
}
.waiting {
    color: #090101;
    font-weight: bold;
}

/* 对局结果文本样式 */
#screen .victory {
    color: #2ecc71; /* 胜利绿色 */
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(46, 204, 113, 0.2);
    animation: pulse 1.5s infinite;
}

#screen .defeat {
    color: #e74c3c; /* 失败红色 */
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}